package vip.sweet.biz.modular.heritage.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.heritage.entity.BizHeritagePersons;
import vip.sweet.biz.modular.heritage.mapper.BizHeritagePersonsMapper;
import vip.sweet.biz.modular.heritage.params.BizHeritagePersonsAddParams;
import vip.sweet.biz.modular.heritage.service.BizHeritagePersonsService;

/**
 * @author ASUS
 * @Date 2025/10/5 11:20
 * @Descripition
 */
@Service
public class BizHeritagePersonsServiceImpl extends ServiceImpl<BizHeritagePersonsMapper, BizHeritagePersons> implements BizHeritagePersonsService {
    @Override
    public boolean add(BizHeritagePersonsAddParams addHeritagePersonsParams) {
        if (ObjectUtil.isNotEmpty(addHeritagePersonsParams))
            return save(BeanUtil.toBean(addHeritagePersonsParams, BizHeritagePersons.class));
        return false;
    }
}
